import React from 'react';
import './style/common.css';

export default class PageContainer extends React.Component {
    
    render() {
        const {title, subTitle, spacing, className, children, footer} = this.props;

        return (
            <section className={className}>
                <div className="page-hd">
                    <h1 className="page-title">{title}</h1>
                    <p className="page-desc">{subTitle}</p>
                </div>
                <div className={spacing ? 'page-bd-spacing' : ''}>
                    {children}
                </div>
                { footer ?
                    <div className="page-ft">
                        {footer}
                    </div> : false }
            </section>
        );
    }
};